/**
 * @作者 chengxinxiaofeng
 * @时间 2019年7月15日10:30:20
 */
package com.chinaunicom.tour.sys.service;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.chinaunicom.tour.sys.entity.SysDepartment;
import com.chinaunicom.tour.sys.mapper.SysDepartmentMapper;
import com.chinaunicom.tour.sys.model.SysDepartmentModel;

@Service
public class SysDepartmentService {

    @Autowired
    SysDepartmentMapper sysDepartmentMapper;

    public int add(SysDepartment entity) {
    	entity.setCreateTime(new Date());
        return sysDepartmentMapper.add(entity);
    }

    public int delete(String id) {
        return sysDepartmentMapper.delete(id);
    }

    public int update(SysDepartment entity) {
        return sysDepartmentMapper.update(entity);
    }

    public SysDepartment findById(String id) {
        return sysDepartmentMapper.findById(id);
    }

    public List<SysDepartment> findList(SysDepartmentModel queryModel) {
        return sysDepartmentMapper.findList(queryModel);
    }

    public int pageQueryCount(SysDepartmentModel queryModel) {
        return sysDepartmentMapper.pageQueryCount(queryModel);
    }

    public List<SysDepartment> pageQuery(SysDepartmentModel queryModel) {
        return sysDepartmentMapper.pageQuery(queryModel);
    }

}
